package org.knot.mockejb3.annotation;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * 
 * 注释类型、对应的处理类
 * 
 * @author yuxiaowei
 *
 */
public class AnnotationType {
    
 
    private static final Map<String, Class> annotations  = new HashMap<String, Class>();
    
    static 
    {
        //类
//        annotations.add("javax.ejb.Stateless");
//        annotations.add("javax.ejb.Stateful");
//        annotations.add("javax.ejb.MessageDriven");
//        annotations.add("javax.persistence.Entity");
        
        //方法
        annotations.put("javax.annotation.PostConstruct", PostConstructAnnotationRuleImpl.class);
        
        annotations.put("javax.annotation.PreDestroy", PreDestroyAnnotationRuleImpl.class);
//        
//        annotations.add("javax.annotation.PostActivate");
//        
//        annotations.add("javax.annotation.PrePassivate");
//        
        annotations.put("javax.ejb.Init", InitAnnotationRuleImpl.class);
//        
        annotations.put("javax.ejb.Remove", RemoveAnnotationRuleImpl.class);
       
        //属性
        annotations.put("javax.ejb.EJB", EJBAnnotationRuleImpl.class);
        
//        annotations.add("javax.annotation.Resource");
        
    }

    public static Map<String,Class> getAnnotations() {
        return annotations;
    }
    
    public static Set<String> getAnnotationKeys() {
        return annotations.keySet();
    }
}
